import React, { FC } from "react";
import { SvgIcon } from "icons/index";
import { useDocumentTitle } from "hooks/useDocumentTitle";
import { useHistory } from "react-router-dom";
import User from "pages/user";

const Home: FC = (props: any) => {
  console.log(props);
  const history = useHistory();
  useDocumentTitle("首页");
  const toUser = () => {
    history.push("user");
  };
  return (
    <div
      style={{
        color: "red",
      }}
    >
      <span onClick={toUser}>to User</span>
      <User test={"test"} />
      {SvgIcon({
        icon: "close",
        size: "50px",
        color: "#999",
      })}
      {SvgIcon({
        icon: "setting",
      })}
    </div>
  );
};

export default Home;
